import React, { Component } from 'react';
import '../styles/Commodity.css'
import pic from '../image/cat.jpg'
class Commodity extends Component {
    state={
        list:[
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥303',Grab:'￥195'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥924',Grab:'￥675'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥2826',Grab:'￥2543'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥430',Grab:'￥413'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥110',Grab:'￥93'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥1749',Grab:'￥1487'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥509',Grab:'￥495'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥275',Grab:'￥225'},
            {pic,text:'Ulike 蓝宝石冰玉脱毛仪',Price:'￥185',Grab:'￥155'}
        ]
    }
    render() {
        return (
            <div className='commodity'>
                {
                    this.state.list.map((item,index)=>{
                        return (
                            <div className="item" key={index}>
                                 <img src={item.pic} alt="" />
                                 <p>{item.text}</p>
                                  <span>原价：{item.Price}</span>
                                  <div>抢购价：{item.Grab}</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default Commodity;